The present invention relates to a method of avoiding collisions between a robot and at least one other object, and to a control device for avoiding collisions between a robot and one or several other objects suited for implementation of the inventive collision avoidance method.
According to a general definition two objects A and B are in collision if they share the same space at the same time. That is, there is at least one point in A and one point in B that have the same coordinates with respect to a common frame of reference.
Robots and other objects between which collisions are to be avoided are generally referred to as cooperative mechanisms, since they cooperate in a certain industrial process. The cooperation can be either active (in the case of one robot cooperation with another robot as an example of a cooperative mechanism) or passive. With modern industrial robots moving at considerable velocities, collisions can result in serious damage to both the robots and the work pieces handled by them and may lead to costly production downtimes. Therefore, such collisions must by all means be avoided if an efficient use of industrial robots is to be realized.
Several types of collisions can occur in a working area, i.e. in a workcell shared by a robot and other (moveable) objects. There are several factors to take into consideration when classifying collisions, particularly: (i) The type of objects in question, i.e. robots/machines, stationary objects, etc. (ii) The reason for collision, i.e. path changes, sensory data changes, programming errors, etc. (iii) The production phase, i e. does the collision occur at teach time (manual mode), validation time (automatic mode) or during normal production (automatic mode with applicationxe2x80x94preferably highxe2x80x94speeds).
A passive stationary object is an object that is fixed in the workcell and has a fixed shape. Examples of passive stationary objects are fixed tables, poles, etc. Obviously, these objects are not controlled by any controller. However, a static geometry model can be obtained and stored so that collision could be checked for. A distinction has to be made between the robot body (links) and the load (tools or workpieces). There could be a permanent potential collision between the robot body and an object. The potential for collision between a tool and the object exists as long as the tool is not linked to any frame on the object. Once the link has been established, (the tool is moving relative to a frame on the object) there is no potential collision between the tool and the object, except during manual operation, e.g. teaching phases or in case of programming errors.
An active stationary object is an object that is fixed in the workcell but that has a variable shape. Examples of active stationary objects are fixtures and palettes (varying heights). Usually robot controllers do not control such objects, thus they do not have any knowledge about their states (open/closed, height etc.). This makes it difficult to check for collision with such objects. However, the collision probability could be eliminated by considering the object as a passive stationary object whose volume is the largest volume possibly occupied by the active stationary object. The distinction between robot body and load mentioned above applies here, too.
A moving object is an object whose position (location and orientation) is not fixed in the workcell. An example of a moving object is a box on a conveyor. Checking for and avoiding collision with such an object requires online knowledge about its position. Path changes can be both expected or unexpected. An expected path change is a change that is inherent to the process and is within known boundaries. Such change could be the result of sensory data, for example, which cause the robot to follow different paths from one cycle to the other. An unexpected path change is a change, either small or large, that occurs when the path is supposed to be the same at all times or that exceeds some boundary of an expected change. Changes that occur when the path is supposed to be constant can be the result of drifts, for example. Dramatic changes that are beyond the boundaries of the expected change can be the result of sensor failure or unhandled errors, e.g. an unsecured part on a conveyor, which is placed beyond the normal position area.
Besides that, there are numerous programming errors that can lead to collisions. These collisions can occur at validation or at normal production phases.
Collisions can also happen during teaching or retouching of points because of user errors or unexpected motions. After the points have been taught or retouched collisions can occur during validation because of unexpected behavior or programming errors. Even if the teaching/retouching phases were collision-free, collisions still can occur during normal production because of path changes or programming errors that did not manifest themselves during the earlier phases. This could happen because several unusual conditions are met at the same time.
U.S. Pat. No. 6,212,444 discloses a method concerning interference avoidance of an industrial robot. In that document, the robot manipulator and another cooperative mechanism are prevented from interfering with each other by defining common areas. One mechanism is prevented from entering the common area until the other mechanism has left it. The common work area approach to avoid collision, however, fails if the control software is not properly written, thus leading to a potentially serious collision in case of an above-mentioned programming error.
Other approaches are applied to offline programming where collision-free paths are generated for the machines (robots and other cooperative mechanisms) in the workcell. However, these methods require a priori knowledge of the robot trajectories. Furthermore, the trajectories of all machines in the workcell have to be repetitive, i.e. the trajectories must not be affected by outside sensors or overrides.
Existing robot controllers usually detect a collision after the fact. Using a dynamic model of the machine, a model motor current is determined. If the actual current exceeds the model current beyond a certain threshold, a collision is assumed to have happened and the system is shut down to minimize damage.
The present invention aims at solving the problem of robot and robot-environment collision avoidance while obviating the above-mentioned disadvantages of the prior art.
To this end, the present invention provides a method of the above-mentioned type, which regularly comprises determining a stopping time for an automatically or manually controlled robot movement on the basis of actual and past joint positions and velocities of each robot joint; forecasting a configuration of a trajectory of the robot at said stopping times; checking the predicted configuration through distance/interference algorithms for interference of robot components with components of said other objects; and stopping the robot and/or said other objects in case a collision is imminent.
In the scope of the invention, said predicted configurations are determined using said stopping times and assuming that the robot continues moving with its present acceleration starting from its present velocity and position. Thus the forecasted trajectories will in general have a speed different form zero. In this context, said configuration is referred to as stopping configuration although it will generally have a speed different form zero.
In order to prevent collisions, configurations are checked for collision not only at the present time, but at a future time that is sufficient for the machines to stop safely prior to any undesired contact.
According to a further development of this method, the robot is stopped on its path. Thus robot operation can be resumed directly from the stopping position without any further position correction or workpiece rejects. Also, stopping the machines on their paths ensures that no collisions will occur while the machines are decelerating to a stop.
In another embodiment of the invention, the robot is stopped off its path. This means that each axis is slowed down from its actual speed to zero following a configurable profile. This can be achieved by short-circuit braking, wherein the motors are decelerated by mechanical brakes and by generator operation. Such a breaking procedure is advisable if a motor cannot be stopped on the path because the ramp is too steep, or for other reasons.
In order to predict or check for collision, one has to be able to determine the distances between the components of the robot and other objects. This involves determining the distance between geometric approximations of the entities involved, which can be either simple shapes such as boxes or spheres or complex polyhedra, i.e. multi-faceted, closed geometric figures. The most widely used method for determining the distance between convex polyhedra is the Gilbert Johnson-Keerthi (GJK) method, which is an iterative method that subdivides the geometry into simplexes until it converges to the minimum distance between the two objects. There is a tradeoff between the accuracy of the approximation and the performance (time of execution) of the collision detection algorithms used in the invention. For example, approximating all the links of a robot by enclosing cylinders, boxes or spheres is rather conservative, but allows for fast execution of the collision detection algorithms. On the other hand, approximating the links by polyhedra, that more accurately approximate the link shape results in less performance of the collision detection algorithms. Therefore, according to a preferred embodiment of the invention, the geometric interference checking involves determining distances between geometric approximations which have different levels of accuracy, which are checked according to a desired accuracy in distance checking. For example, if the enclosing shapes are far away from each other, then there is no need to check the more accurate approximations. Geometry approximation is a challenging and time-consuming task. However, there is already commercial software available, that automatically translates CAD models into geometry files that can be used with the collision detection algorithms. Collision avoidance involves accurate specification of the trajectories. Since the motion profiles of industrial robots are sufficiently smooth, relatively simple configuration prediction algorithms can be used to predict the trajectories. From the actual position and actual velocity of each joint i at present and past times, one can forecast the joint trajectory in terms of a future joint position as follows:
xcex8i=1/2xcex3iti,s+{dot over (xcex8)}i,0ti,s+xcex8i,0xe2x80x83xe2x80x83(1)
where xcex8i,0, and xcex8i,0 are the joint position and velocity at the current time t, respectively; xcex3i is the estimated joint acceleration at t and ti,s the stopping time. The joint acceleration can be estimated from the joint velocity at time t and earlier times txe2x88x92k, txe2x88x92k=txe2x88x92kxc2x7xcex94t(k=1, 2, 3, . . . ), where xcex94t is the checking time interval, which may be equal to the sampling period of the robot controller and can take on values around 12 ms. The joint position xcex8 and the joint velocity {dot over (xcex8)} are given as an angular position (deg) and an angular velocity (deg/s), respectively.
According to a preferred embodiment of the invention the velocity {dot over (xcex8)}i of joint i is estimated from the joint position xcex8i,0 at current time t and at earlier times txe2x88x92k using Gear""s method, i.e.:                                           θ            .                    i                =                              c            f                    ·                                    ∑                              k                =                0                            4                        ⁢                          xe2x80x83                        ⁢                                          c                k                            ·                              θ                                  i                  ,                                      -                    k                                                                                                          (        2        )            
where xcex8ixe2x88x92k=xcex8i(txe2x88x92k), and cf=1/(12 xcex94t), c0=25, c1=xe2x88x9248, c2=36, c3=xe2x88x9216, c4=3.
Similarly, the acceleration xcex3i of joint i is estimated from the joint velocity {dot over (xcex8)}i at current time t and at earlier times txe2x88x92k, txe2x88x92k=txe2x88x92kxc2x7xcex94t, using:                               γ          i                =                              c            f                    ·                                    ∑                              k                =                0                            4                        ⁢                          xe2x80x83                        ⁢                                          c                k                            ·                                                θ                  .                                                  i                  ,                                      -                    k                                                                                                          (        3        )            
An investigation has been conducted to test the accuracy of the prediction, which has been found sufficient for prediction times up to 240 ms for typical robot applications.
According to another embodiment of the invention, configuration forecasting and interference checking involves: determining a stopping distance of joint i from             θ              i        ,        stop              =                            θ          .                0        2                    (                  2          ⁢                      xe2x80x83                    ⁢                      γ                          i              ,              max                                      }              ,
where xcex3i,max, is a maximum negative acceleration of the joint; adding the stopping distance xcex8i,stop to the actual position to obtain a configuration over the stopping time; and determining a distance between robot components and said other object at said configuration. This is a rather conservative approach: For example, the maximum velocity and maximum deceleration of the first joint of a robot could be 240 deg/s and 880 deg/s2, respectively. Therefore, the joint""s stopping angle from full speed is approximately 33 deg. Thus, due to the large stopping distance a collision could be predicted at the stopping configuration even though the planned trajectory is actually collision-free.
In order to enhance the accuracy of position prediction, according to a further development of the inventive method a filter is applied to the joint position and velocity data used for position prediction. Preferably, the filter is applied to the data in the time domain. In a preferred embodiment of the invention the filter is devised as a running average which efficiently smooths the data and thus filters predominantly the high frequency components which are present especially during abrupt directional changes of the robot movement (jerks). Filter length can be adapted to the desired prediction accuracy or the irregularity of the motion profile. Alternatively, filtering can also be done in the frequency domain.
The stopping time of a robot axis depends on the following parameters:
axis velocity: The higher the speed the more time is needed to stop the robot.
maximum allowed deceleration: The higher the maximum allowed deceleration, the less time is needed to stop the robot.
configuration of the robot: Since the inertia of the robot is configuration dependent, the stopping time of a given axis depends on the values of the remaining axes, in particular the axes down the kinematic chain, i.e. towards the distal end of the robot.
payload: The heavier the load and the higher its inertia, the more time is needed to stop the robot.
The stopping time can be estimated from a lookup table. However, given the number of parameters upon which the stopping time of an axis depends the invention provides a mechanism that has been devised to estimate the axes stopping times in a manner that is suitable for real-time applications. Thus, to further enhance both the accuracy and the speed of stopping time estimation and in order to make this estimate more flexible and more adapted to a particular situation, according to a further development of the invention configuration forecasting and interference checking involves using at least one neural network to estimate stopping times of the robot axes. In a preferred embodiment one neural network is used for each robot joint.
In this scope, the method according to the invention uses multilayer, back propagation neural networks (NN). The NNs take as inputs the parameters that influence the axis"" stopping time, and produces an estimation of the axis"" stopping time. The NNs are trained with data measured from the robot. The training data set should cover the whole working space of the parameters including one or more elements from a group comprising joint velocities, joint angles, joint positions, robot base positions, robot base velocities and tool or load masses. Once the NNs are trained they can be used to accurately estimate the stopping times.
U.S. Pat. No. 6,356,806 B1/DE 198 57 436 A1 discloses the use of a combination of a standard PC operating system and a real time operating system for robot control. The robot and workpiece geometry are approximated in an external CAD or offline simulation system and the resulting output file is stored in conjunction with the standard PC operating system of the robot controller. In order to make the geometry file, which is usually created and maintained in conjunction with the PC operating system, accessible for tasks running under the real-time operating system when using the method according to the invention with this dual type of robot control unit, all acquired information concerning collisions is preferably stored in a workcell description file for communication to a real-time operating system responsible for controlling the robot movement.
In a further development of the inventive method, the work cell description file contains pointers to geometric approximation files needed to describe all objects present in the workcell. According to another embodiment of the inventive method, a copy of the workcell description file is maintained and updated on each controller, i.e. on each cooperative mechanism present in the workcell. Furthermore, the workcell description file can be updated at least when a geometric change happens in the workcell, e.g. mounting of a new tool to the robot. This can also happen in the real-time operating system.
Most robotic applications require some form of allowed and controlled contact, e.g. material handling, welding, etc. Therefore, the controller must know that these contacts are not to be treated as dangerous collisions leading to a stop of the robot motion. To this end, prior to an allowed contact between the robot and an object, e.g. during a handling operation a link is established causing the robot and, where applicable, the object not to stop during a subsequent xe2x80x9ccollisionxe2x80x9d. This link can be broken after the allowed contact operation is terminated.
In this context it is important to distinguish between situations where all machines present in a workcell are moving along known, predefined trajectories and situations, where the machines"" trajectories are modified at real time, e.g. based on sensory information (cameras etc.). Here the former shall be called synchronous situations while the latter are referred to as asynchronous situations. Such situations also exist in the relationship between, for instance, a robot and a tool used by the robot. A component of the workcell is linked to another component if the former is moving in a frame fixed on the latter. In this case, the relative motion between the two components is synchronous and there is no potential collision between them while the link is established, i.e. movement of one component, for instance a first robot, will cause a corresponding movement of the other component, e.g. a second robot. Thus the relationship between the two is kept constant. A potential for collision might exist before the link is established or after the link has been broken. A tool that comes in contact with a workpiece is linked to that workpiece. Therefore, it is then moving relative to a frame fixed on the workpiece. The operation is then synchronous and there is no potential of collision between the tool and the workpiece. The asynchronous cases can represent up to 90% of the cases in factory use of industrial robots.
In order to use the above-described method with a robot for avoiding collision between the robot and at least one other object, the invention further provides a control device comprising means for regularly determining a stopping time for an automatically or manually controlled robot movement on the basis of actual and past joint positions and velocities of each robot joint; means for regularly forecasting a configuration of a trajectory of the robot at said stopping times; means for regularly checking the predicted configuration through distance/interference algorithms for interference of robot components with components of said other objects; and means for stopping the robot and/or said other objects in case a collision is imminent.
The inventive control unit shall be called a Collision Avoidance Manager (CAM). The CAM is a controller that is responsible for detecting and reacting to collisions between at least two components of the workcell. There can be more than one CAM in a workcell.
In another embodiment the control device according to the invention comprises processor means for running two operating systems in parallel, one of which being a standard PC operating system, the other one being a real-time operating system for controlling robot motion; said processor means for running an interpretation program for communication between the PC and the real-time operating systems. In this way, the user is provided with a standard user interface which very much simplifies robot programming. In a preferred embodiment said processor means are devised for running respective parts of a program implementing a collision avoidance method. In a further development the control device according to the invention comprises memory units in conjunction with both operating systems for storing work cell related geometry data.
As was mentioned earlier, all the information about collisions (e.g. potential collisions, pointers to geometry files, etc.) is stored within memory units of the CAM in special workcell description files called WorkCell Diagrams (WCD). For each component of the cell, information about its potential collisions and geometry files is thus stored in the memory units. This information is loaded onto the real-time control, so that the above-described Collision Avoidance Tasks (CAT), i.e. the actual prediction of robot movement and its stopping on or off the path in connection with the inventive method can access it in real-time.
In order to communicate collision information between the two operating systems, the control unit according to the invention provides an interpretation program or interpreter, preferably running under the PC operating system. As a workcell can contain several CAMS in connection with a plurality of collision-monitored robots etc., a further development of the control device according to the invention comprises processor means at least in connection with the real-time operating system, that are designed for communication with real-time operating systems of other corresponding control devices present in the same workcell. The thus defined inter-controller communication task receives data from the appropriate robot controllers (controllers for which a particular CAM is detecting collisions).
Communication between controllers is a requirement for many aspects of cooperation between robots. In this context different data need to be communicated to the CAM for the collision avoidance to work. The CAM needs to know the configuration of components in the workcell. Therefore, for every robot or object that the CAM is monitoring, the following needs to be communicated:
joint values: These define the configuration of the robot with respect to its base;
base coordinates: This, in conjunction with the joint values, defines the configuration of the robot in the workcell. Note that the base may be moving if the robot is mounted on a rail, for example;
joint velocities and base velocities: These are used in the collision prediction algorithms. Note that the base frame velocity is not readily available from the controller and must be either acquired or estimated using data acquired from the external machine that is moving the robot base;
part changes;
tool changes;
target changes; and
potential collision changes.
Tool and part changes on the robot that is controlled by the CAM are communicated to the real-time portion of the controller through the interpreter.
According to another embodiment of the invention the control unit further comprises an input device for inputting workcell related geometric data. In this way an externally created CAD geometry file can easily be provided to the CAM. The input device can for instance be a disk drive or a network connection device.
From the above description it is evident, that the present invention has several advantages over previous work: The user does not need to make any provisions in a robot program for avoiding collisions, such as programming common work areas. Still the inventive method can be used as a safeguard in conjunction with other explicit methods of prior art.
Furthermore, the inventive method allows for automatic con figuration of the workcell from a collision avoidance standpoint. It determines automatically which components have potential collisions with which other components.
Since the inventive method is based on predicting the con figurations of the moving components over a period of time which is sufficiently long to allow the machines to stop safely and then checks for interference, a priori knowledge of trajectories is not required. If a collision is predicted the machines are commanded to stop on or off their paths.
Since especially the teach and validation phases are inherently low speed, the stopping times and distances are very short. Thus the inventive method works particularly well in these cases. Collisions that are caused by programming errors or unexpected large path changes lead to a contact between objects that shouldxe2x80x94under normal conditionsxe2x80x94always be far apart from each other. In this case, predicting a planned or stopping configuration may actually be too elaborate and might not be necessary. It then suffices to monitor the distance between the respective objects and to command them to stop if they ever approach one another to within a certain predetermined distance. This simplified approach works for any phase and any speed of movement provided that the distance threshold can be chosen large enough. If not, the more precise approach according to the above specification has to be adopted.